Date.prototype.format = function (formatter) {//格式化
    var o = {
        "M+": this.getMonth() + 1,
        "d+": this.getDate(),
        "H+": this.getHours(),
        "m+": this.getMinutes(),
        "s+": this.getSeconds(),
        "q+": Math.floor((this.getMonth() + 3) / 3),
        "S": this.getMilliseconds()
    };
    if (/(y+)/.test(formatter))
        formatter = formatter.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
    for (var k in o)
        if (new RegExp("(" + k + ")").test(formatter))
            formatter = formatter.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length));
    return formatter;
};

Date.prototype.covert = function (timestamp) {//时间戳转为时间
    return new Date(parseInt(timestamp));
};

Array.prototype.remove = function (el) {//移除item
    for (var i = 0; i < this.length; i++) {
        if (this[i] == el) {
            this.splice(i, 1);
        }
    }
};